package com.jetpackframework.virtual;

import android.content.Context;
import android.content.ContextWrapper;
import android.content.pm.PackageManager;
import android.content.res.Resources;

public class PluginContext extends ContextWrapper {
    private final VirtualApk apk;

    public PluginContext(VirtualApk apk, Context base) {
        super(base);
        this.apk = apk;
    }

    @Override
    public PackageManager getPackageManager() {
        return new PluginPackageManager(apk,super.getPackageManager());
    }

    @Override
    public String getPackageName() {
        return apk.getPackageName();
    }

    @Override
    public Resources getResources() {
        return apk.getResources();
    }

    @Override
    public Resources.Theme getTheme() {
        return apk.getTheme();
    }
}
